<template>
    <div>
        <div data-v-295bc851="" class="person_content">
            <ul data-v-295bc851="" class="person_title clearfix">
                <li data-v-295bc851="" class="now">我的关注</li>
            </ul> <!---->
            <el-table
                    :data="tableData"
                    stripe
                    border
                    style="width: 100%">
                <el-table-column
                        prop="name"
                        label="关注的店铺"
                        align="center">
                </el-table-column>
                <el-table-column
                        label="操作"
                        align="center">
                    <template slot-scope="scope" >
                        <router-link :to="{path: '/teacherXinX',query:{teacherId:scope.row.s_id}}">
                        <el-button type="primary" size="mini" >进入店铺主页</el-button>
                        </router-link>
                    </template>
                </el-table-column>
            </el-table>
            <!--分页-->
            <el-pagination
                    @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
                    :current-page="currentPage"
                    style="float: right;margin-top: 20px; margin-bottom: 22px"
                    :page-sizes="[5, 10, 15, 20]"
                    :page-size="pageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="allTotal">
            </el-pagination>
        </div>

    </div>
</template>

<script>
    import result from "../../../config";

    export default {
        name: "GuanZhu",
        data() {
            return {
                tableData:[],
                //当前页面--》page
                currentPage:1,
                //每页几条--》limit
                pageSize:5,
                //总条数
                allTotal:0,
                HuiYuanId: window.sessionStorage.getItem("memberId"),
                GuanZhuXinxi: [],
                guanZhuData: {
                    teacherid: '',
                    memberid: window.sessionStorage.getItem("memberId"),
                },
            }
        },
        created() {
            this.initTabled();
        },
        methods: {
            dianpu(){

            },
            //分页
            handleSizeChange(val) {
                this.pageSize=val;
                this.intTableAll();
            },
            //分页按钮被点击，发生改变时
            handleCurrentChange(val) {
                this.currentPage=val;
                this.intTableAll();
            },
            //关注店铺的显示
            initTabled(){
                this.$http.post("/system/shop/show/"+this.currentPage+"/"+this.pageSize).then(result=>{
                    if (result.data.code===2000){
                        this.tableData=result.data.data.records;
                        this.allTotal=result.data.data.total;
                        console.log(result)
                    }else {
                        this.$message.error("查询失败")
                    }
                })
            }
            // //查询所有关注的讲师信息
            // queryAllGuanZhuTeacher() {
            //     var that = this;
            //     this.$http.post("/core/shoucangTeacher/findAttentionTeacherById/" + this.HuiYuanId).then(function (resp) {
            //         that.GuanZhuXinxi = resp.data.result;
            //     })
            // },
            // // //取消关注讲师
            // cancel(teacherid) {
            //     this.guanZhuData.teacherid = teacherid;
            //     var that = this;
            //     this.$http.post("/core/shoucangTeacher/deleteAttentionTeacher", this.guanZhuData).then(function (resp) {
            //         that.queryAllGuanZhuTeacher();
            //     })
            // }
        }
    }

</script>

<style scoped>
    .person_content[data-v-295bc851] {
        width: 1012px;
        float: right;
        background: #fff;
        border-radius: 6px;
    }
    .person_info[data-v-295bc851] {
        min-height: 400px;
        padding-bottom: 30px;
    }

    .person_content {
        width: 1012px;
        float: right;
        background: #fff;
        border-radius: 6px;
    }
    .person_title li[data-v-295bc851] {
        float: left;
        line-height: 60px;
        padding: 0 30px;
        font-size: 14px;
    }
    .person_title li.now {
        border-bottom: 2px solid #d51423;
    }
    .person_title li {
        color: #d51423;
        float: left;
        line-height: 60px;
        padding: 0 30px;
        font-size: 14px;
    }
    .course_content[data-v-295bc851] {
        padding: 25px 0;
        margin: 0 25px;
        border-bottom: 2px solid #f2f2f2;
        position: relative;
    }
    .course_content img[data-v-295bc851] {
        width: 86px;
        height: 86px;
        border-radius: 50%;
    }
    .course_content p.course_name[data-v-295bc851] {
        top: 25px;
        color: #333;
    }
    .course_content a[data-v-295bc851] {
        display: block;
        width: 106px;
        height: 36px;
        line-height: 36px;
        text-align: center;
        border-radius: 6px;
        font-size: 14px;
        border: 1px solid #999;
        color: #999;
        background: #fff;
        position: absolute;
        top: 25px;
        right: 0;
        cursor: pointer;
    }
    .course_content a.close_collect[data-v-295bc851] {
        top: 80px;
        border: none;
    }
    .course_content p.course_name[data-v-295bc851] {
        top: 25px;
        color: #333;
    }
    .course_content .img_box[data-v-295bc851] {
        display: inline-block;
        width: 86px;
        height: 86px;
        border-radius: 50%;
    }
    .course_content p.course_name[data-v-295bc851] {
        top: 25px;
        color: #333;
    }
    .course_content p[data-v-295bc851] {
        position: absolute;
        font-size: 14px;
        left: 115px;
        color: #999;
    }
</style>